package com.dmxtechnologies.community.monitor.ejb.bean;

import java.util.logging.Logger;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.core.MediaType;

public class MonitorRestClient {
	private static Logger logger = Logger.getLogger("MonitorRestClient");
	public static String sendMonitorRequestToEIS(String url) {
   		Client client = ClientBuilder.newClient();
   		String name = null;
		try {
			name = client.target(url)
			.request(MediaType.APPLICATION_JSON_TYPE)
			.get(String.class);
		} catch (Exception e) {
			logger.info(e.getMessage());
		}finally{
			client.close();
		}
   		return name;
	}
}
